<?php

namespace App\B2BProject\Custom;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

/**
 * Class Message
 *
 * 短消息
 *
 * @package App\B2BProject\Custom
 */
class Message extends Model
{
    /**
     * 获取未读消息
     *
     * @param Builder $builder
     *
     * @return $this
     */
    public function scopeUnread(Builder $builder)
    {
        return $builder->where('status', false);
    }
}
